﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;

namespace 个人博客.instrumentClass
{
    //背景图库
    public class backgroundImage
    {
        public string Image() {
            var b = HttpRuntime.AppDomainAppPath.ToString();
            var a = Directory.GetFiles(HttpRuntime.AppDomainAppPath.ToString() + "/Image/background-Image");
            Random r = new Random();
            var c = a[r.Next(0, a.Length)];
            int d = c.LastIndexOf(@"\")+1;
            var e = "../Image/background-Image/"+c.Substring(d);
            return e;
        }
    }
}